<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>dev: dev::net::TcpServer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">dev
   &#160;<span id="projectnumber">0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classdev_1_1net_1_1_tcp_server.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classdev_1_1net_1_1_tcp_server-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">dev::net::TcpServer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_tcp_server_8hpp_source.html">TcpServer.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for dev::net::TcpServer:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classdev_1_1net_1_1_tcp_server.png" usemap="#dev::net::TcpServer_map" alt=""/>
  <map id="dev::net::TcpServer_map" name="dev::net::TcpServer_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdev_1_1net_1_1_tcp_server_1_1_statics.html">Statics</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a82038ef30d8889c4e8a79ecdfb45d5ea"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a82038ef30d8889c4e8a79ecdfb45d5ea"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>Options</b> { <br />
&#160;&#160;<b>CONNISSIZE</b> = 1, 
<b>CONNOSSIZE</b>, 
<b>WORKERNUM</b>, 
<b>MASTERASWORKER</b>, 
<br />
&#160;&#160;<b>CONNHEARTBEATTIME</b>, 
<b>FRAMETIME</b>, 
<b>LOGGER</b>, 
<b>MASTERFRAMETIME</b>
<br />
 }<tr class="separator:a82038ef30d8889c4e8a79ecdfb45d5ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
<tr class="memitem:aa2ef40de7fbb3532183817ddf22fb077"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2ef40de7fbb3532183817ddf22fb077"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>Status</b> { <b>READY</b> = 1, 
<b>RUNNING</b>, 
<b>EXITING</b>, 
<b>EXIT</b>
 }<tr class="separator:aa2ef40de7fbb3532183817ddf22fb077"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
<tr class="memitem:a07de65eb836064e847e6c1aef180704f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07de65eb836064e847e6c1aef180704f"></a>
typedef boost::function&lt; void(TcpConnectionPtr &amp;)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PassTcpConnectionPtrRefCB</b></td></tr>
<tr class="separator:a07de65eb836064e847e6c1aef180704f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e12ddbe0887babe28e48e262a94187a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e12ddbe0887babe28e48e262a94187a"></a>
typedef boost::function&lt; void(<a class="el" href="classdev_1_1net_1_1_tcp_connection.html">TcpConnection</a> &amp;, <a class="el" href="classdev_1_1net_1_1_tcp_connection_input_stream.html">TcpConnectionInputStream</a> &amp;)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>InputTcpMessageCB</b></td></tr>
<tr class="separator:a5e12ddbe0887babe28e48e262a94187a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8ae9c2ec2c86bf61293f7295212e3e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae8ae9c2ec2c86bf61293f7295212e3e9"></a>
typedef boost::function&lt; void(<a class="el" href="classdev_1_1net_1_1_tcp_connection.html">TcpConnection</a> &amp;)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PassTcpConnectionRefCB</b></td></tr>
<tr class="separator:ae8ae9c2ec2c86bf61293f7295212e3e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8ab342f7271a6ec0faebd41b73ba01db"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ab342f7271a6ec0faebd41b73ba01db"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TcpServer</b> (<a class="el" href="classdev_1_1net_1_1_event_loop.html">EventLoop</a> &amp;eventLoop)</td></tr>
<tr class="separator:a8ab342f7271a6ec0faebd41b73ba01db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc40c8a3ac309ae92182de21a014d4cd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc40c8a3ac309ae92182de21a014d4cd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>open</b> (const char *addr, int port, int backlog)</td></tr>
<tr class="separator:afc40c8a3ac309ae92182de21a014d4cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae67b41a11acb5d88fbec1381db9519a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae67b41a11acb5d88fbec1381db9519a5"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>reopenAcceptor</b> (void)</td></tr>
<tr class="separator:ae67b41a11acb5d88fbec1381db9519a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaed3e34567944fa4ae5dcf9cab432f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaaed3e34567944fa4ae5dcf9cab432f1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>shutdownAcceptor</b> (void)</td></tr>
<tr class="separator:aaaed3e34567944fa4ae5dcf9cab432f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a1dad7975f87e158b8a7593e1fe9f2c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a1dad7975f87e158b8a7593e1fe9f2c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>config</b> (Options optname, size_t val)</td></tr>
<tr class="separator:a3a1dad7975f87e158b8a7593e1fe9f2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7441e489b1a31c26bf882e9db666ede7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7441e489b1a31c26bf882e9db666ede7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>config</b> (Options optname, base::LoggerPtr logger)</td></tr>
<tr class="separator:a7441e489b1a31c26bf882e9db666ede7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8858c03e9c473d4a8313315c267fef28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8858c03e9c473d4a8313315c267fef28"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>close</b> (void)</td></tr>
<tr class="separator:a8858c03e9c473d4a8313315c267fef28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a432e4a15b95070be15e209c8df1388e0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a432e4a15b95070be15e209c8df1388e0"></a>
Status&#160;</td><td class="memItemRight" valign="bottom"><b>getStatus</b> (void) const </td></tr>
<tr class="separator:a432e4a15b95070be15e209c8df1388e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e220d5f8583a8a2f0f051a3569d9202"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e220d5f8583a8a2f0f051a3569d9202"></a>
<a class="el" href="classdev_1_1net_1_1_event_loop.html">EventLoop</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getLoop</b> ()</td></tr>
<tr class="separator:a5e220d5f8583a8a2f0f051a3569d9202"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f658200172e25adc9742d5898898954"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f658200172e25adc9742d5898898954"></a>
base::LoggerPtr &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getLogger</b> ()</td></tr>
<tr class="separator:a4f658200172e25adc9742d5898898954"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe3b79a95b08b5c7a919a3b2e76bd9af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abe3b79a95b08b5c7a919a3b2e76bd9af"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>getStatics</b> (struct <a class="el" href="structdev_1_1net_1_1_tcp_server_1_1_statics.html">Statics</a> &amp;statics)</td></tr>
<tr class="separator:abe3b79a95b08b5c7a919a3b2e76bd9af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb44994cacaadcea458dbb71b8e61bde"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb44994cacaadcea458dbb71b8e61bde"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setConnectionEstablishedCallback</b> (PassTcpConnectionPtrRefCB callback)</td></tr>
<tr class="separator:adb44994cacaadcea458dbb71b8e61bde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62e73a62349fdd62215f96afd0f3d38e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a62e73a62349fdd62215f96afd0f3d38e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setMessageCallback</b> (InputTcpMessageCB callback)</td></tr>
<tr class="separator:a62e73a62349fdd62215f96afd0f3d38e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cd08dbc08ba2531651c7b5a7f12bd3b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6cd08dbc08ba2531651c7b5a7f12bd3b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setConnectionErrorCallback</b> (PassTcpConnectionRefCB callback)</td></tr>
<tr class="separator:a6cd08dbc08ba2531651c7b5a7f12bd3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a0d9ffedf373a1273956ed8e18bd7cd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a0d9ffedf373a1273956ed8e18bd7cd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setConnectionClosingCallback</b> (PassTcpConnectionRefCB callback)</td></tr>
<tr class="separator:a8a0d9ffedf373a1273956ed8e18bd7cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b77dbdf103adc58fd3010e00087b103"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b77dbdf103adc58fd3010e00087b103"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setConnectionHeartBeatCallback</b> (PassTcpConnectionRefCB callback)</td></tr>
<tr class="separator:a0b77dbdf103adc58fd3010e00087b103"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45b3761f9b4e3a99343505146e62bd5d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45b3761f9b4e3a99343505146e62bd5d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setConnectionWritableCallback</b> (PassTcpConnectionRefCB callback)</td></tr>
<tr class="separator:a45b3761f9b4e3a99343505146e62bd5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93f1dff4b167baec889fb7c2141ba3a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93f1dff4b167baec889fb7c2141ba3a5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setConnecionFactory</b> (TcpConnectionFactoryPtr factory)</td></tr>
<tr class="separator:a93f1dff4b167baec889fb7c2141ba3a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c5d62a3aaa403f88ca0dabd1f3e9b9a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4c5d62a3aaa403f88ca0dabd1f3e9b9a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setServerShutdownCallback</b> (boost::function&lt; void(void)&gt; callback)</td></tr>
<tr class="separator:a4c5d62a3aaa403f88ca0dabd1f3e9b9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a43fe1eaa6c6b4d4ecbb2ba361d312b66"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43fe1eaa6c6b4d4ecbb2ba361d312b66"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>TcpConnection</b></td></tr>
<tr class="separator:a43fe1eaa6c6b4d4ecbb2ba361d312b66"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Tcp服务器 </p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>dev/dev/net/<a class="el" href="_tcp_server_8hpp_source.html">TcpServer.hpp</a></li>
<li>dev/src/net/TcpServer.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>dev</b></li><li class="navelem"><b>net</b></li><li class="navelem"><a class="el" href="classdev_1_1net_1_1_tcp_server.html">TcpServer</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.10 </li>
  </ul>
</div>
</body>
</html>
